# Copyright 2010-2025 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Code specific to GLPK used in glpk_solver.cc.
package(default_visibility = ["//ortools/math_opt/solvers:__subpackages__"])

cc_library(
    name = "rays",
    srcs = ["rays.cc"],
    hdrs = ["rays.h"],
    deps = [
        "//ortools/base:logging",
        "//ortools/base:status_macros",
        "//ortools/glpk:glpk_computational_form",
        "//ortools/glpk:glpk_formatters",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/strings",
        "@glpk",
    ],
)

cc_library(
    name = "glpk_sparse_vector",
    srcs = ["glpk_sparse_vector.cc"],
    hdrs = ["glpk_sparse_vector.h"],
    deps = [
        "//ortools/base:logging",
        "@com_google_absl//absl/log:check",
    ],
)

cc_test(
    name = "glpk_sparse_vector_test",
    srcs = ["glpk_sparse_vector_test.cc"],
    deps = [
        ":glpk_sparse_vector",
        "//ortools/base:gmock_main",
    ],
)

cc_library(
    name = "gap",
    srcs = ["gap.cc"],
    hdrs = ["gap.h"],
)

cc_test(
    name = "gap_test",
    srcs = ["gap_test.cc"],
    deps = [
        ":gap",
        "//ortools/base:gmock_main",
        "//ortools/util:fp_roundtrip_conv",
    ],
)
